#!/bin/bash
# The following may be heavily borrowed from, if not 
# copied from, the NSA's December 20, 2007 "Guide to the 
# Secure Configuration of Red Hat Enterprise Linux 5, Revision 2"

# Title - Require Authentication for Single-User Mode

#Initialize variables
export PRECHECK="grep '\~:S:wait:/sbin/sulogin' /etc/inittab"
export QUESTION="Would you like to require authentication for single-user mode?"
export DESCRIPTION="Single-user mode is intended as a system recovery method, providing a single user root access to the system by
providing a boot option at startup. By default, no authentication is performed if single-user mode is selected.
This provides a trivial mechanism of bypassing security on the machine and gaining root access."
export SOLUTION="echo \~:S:wait:/sbin/sulogin >> /etc/inittab" 